<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="YanWenlei">
<title>积分活动管理</title>
<script language="javascript" src="../script/common.js"
	type="text/javascript"></script>
<script language="javascript" type="text/javascript"> 	
		var data = parent.persongl;
		var b;
		//全局变量
		var org = Common.cOrg();		//当前单位
		var qt = {};	
			var qtrun = {};			//数据表格对象
		var qt2 = {};				//数据表格对象
		var qt3 = {};	
		var qt5= {};
		var qt7={};			//数据表格对象
		var qtorg={};
		var qtcal={};
		var qtlist={};
		var qtsend={};
	     var qtPro={};
		var qtFun={};
		var ruleid;
		var orderid;
		var customers;
		var editable;
		var oper=Common.cOperator();
		var calculateTypelist=[{code:"1",text:"按消费金额"},{code:"2",text:"按消费油量"}]
		var templetList=[{code:"1",text:"普通消费类积分"},{code:"2",text:"特殊消费类奖励类积分"}]
		var timelist=[{code:"1",text:"1:00"},{code:"2",text:"2:00"},{code:"3",text:"3:00"},{code:"4",text:"4:00"},{code:"5",text:"5:00"},{code:"6",text:"6:00"},{code:"7",text:"7:00"},{code:"8",text:"8:00"},{code:"9",text:"9:00"},{code:"10",text:"10:00"},{code:"11",text:"11:00"},{code:"12",text:"12:00"},{code:"13",text:"13:00"},{code:"14",text:"14:00"},{code:"15",text:"15:00"},{code:"16",text:"16:00"},{code:"17",text:"17:00"},{code:"18",text:"18:00"},{code:"19",text:"19:00"},{code:"20",text:"20:00"},{code:"21",text:"21:00"},{code:"22",text:"22:00"},{code:"23",text:"23:00"},{code:"24",text:"24:00"}]
		
		//初始化下拉框
		function load(){
		Eui.showNavigation();
		  	org = Common.cOrg();
		    $("viewdate").orgid.value=org.id;
		   
		     $("listview").style.display="";
		   DWR.call("giftStorageService.getLocationAllParents",function(v){	
		  	$("runfrom").orgid.value=v;
		  	});
		    Common.initDict("unitNo","pointactivity_state","全      部");
			 //findTempletName2();
			findGiftCate();
			deleteRuleByFun()
		   Common.initDict(ungrayform.guizemoban,templetList);
		   Common.initDict($("groupformss").rulestarttime,timelist);
		   Common.initDict($("groupformss").ruleendtime,timelist);
		   Common.initDict(ungrayform.caltype,calculateTypelist);
			setPages(["listview","listview2","listview9","detviewaa","detviewsave1","detview2","detviewsave6","ruleatt","rulecal","group_a","detview3","datelistview","group_all","runpaviwe"]);
			createTable();
			
		}
		function deleteRuleByFun(){
		DWR.call("pointActivityService.deleteRuleByFuns",function(){
		});
		
		}
		function saveCal(){
		
		var s;
		var e;
		var sf;
		var ef;
		var b1;
		var b2;
		if($("A201").checked){
		   s=$("rulestarttime").value;
		   e=$("ruleendtime").value;
		   b1=true;
		   
		}else{
		b1=false;
		s=0;
		e=0;
		}
		if($("A202").checked){
	        b2=true;
		   sf=$("rulestartfun").value;
		   ef=$("ruleendfun").value;
		}else{
		b2=false;
		sf=0;
		ef=0;
		}
	     	DWR.call("pointActivityService.createPointRuleCals",ruleid,s,e,sf,ef,$("rate").value,b1,b2,function(result){
	     	     showInformation("增加成功！！");
	     	      $("caldatalist").style.display="";
	     		createTableCal();
	     	});
	
		}
		function backOrder(){
		$('listBtn1').disabled=false;
		switchPage('group_all');
		$("listview").style.display="";
		createTable();
		}
		function replayRulePro(){
		      $("A01").checked=false;
		      $("A02").checked=false;
		      $("A03").checked=false;
		      $("a01div").style.display="none";
		      $("xiaofeileixing").value="";
		
		      $("a02div").style.display="none";
	   	   var   obj=document.getElementsByName("customers1");
		      for (var i=0;i<obj.length;i++) {
                  obj[i].checked=false;
                  }
		
		    $("a03div").style.display="none";
		    $("orgdatalist").style.display="none";
		     $("groupform").orgids.value="";
	      
		   DWR.call("pointActivityService.deleteRulePros",ruleid,function(result){
	     		    	$("savegroupbt").disabled=false;
                         $("canceleditbt").disabled=true;
	     	});
		
		}
		function saveRulePro(){
		  var str="";	
            var obj=document.getElementsByName("customers1");
             for(var i=0;i <obj.length;i++){ 
              if(obj[i].checked){ 
               if(i!=obj.length-1){
                str+=obj[i].value+",";  
               }else{
                  str+=obj[i].value              
               }
                } 
           } 
			DWR.call("pointActivityService.createPointRulePros",ruleid,$("xiaofeileixing").value,str,$("groupform").orgids.value,function(result){
	     		    	showInformation("增加成功！！");
	     		    	$("savegroupbt").disabled=true;
	     		    	$("canceleditbt").disabled=false;
	     	});
		
		}
		function changemoban(){
		if(ungrayform.guizemoban.value==2){
		ungrayform.jifenlv.value=0;
	     ungrayform.jifenlv.disabled=true;
		}else{
		ungrayform.jifenlv.disabled=false;
		ungrayform.jifenlv.value="";
		}
		}
		function a01change(){
		 if($("A01").checked){
		 
		      $("a01div").style.display="";
		 }else{
		      $("a01div").style.display="none";
		      $("xiaofeileixing").value="";
		 }
		  if($("A02").checked){
		      $("a02div").style.display="";
		 }else{
		      $("a02div").style.display="none";
		 var   obj=document.getElementsByName("customers1");
		      for (var i=0;i<obj.length;i++) {
                  obj[i].checked=false;
                  }
		 }
		  if($("A03").checked){
		     $("a03div").style.display="";
		     $("orgdatalist").style.display="none";
		     
		 }else{
		    $("a03div").style.display="none";
		    $("orgdatalist").style.display="none";
		     $("groupform").orgids.value="";
		 }

		}
		function a201change(){
		 if($("A201").checked){
		      $("a101div").disabled=false;
		      $("a102div").disabled=false;
		      $("rulestarttime").readOnly=false;
		      $("ruleendtime").readOnly=false;
		 }else{
		       $("a101div").disabled=true;
		       $("a102div").disabled=true;
		       $("rulestarttime").readOnly=true;
		       $("ruleendtime").readOnly=true;
		       $("rulestarttime").value="";
		       $("ruleendtime").value="";
		 }
		 var form = $("groupformss");
		  if($("A202").checked){
		  	$("a201div").disabled = false;
		  	$("a202div").disabled = false;
		  	$("ruleendfun").readOnly = false;
		  	$("rulestartfun").readOnly = false;
		     form.rulestartfun.onblur = function(){
		  	return checkV(this,'number',true)
		  }
		  form.ruleendfun.onblur = function(){
		  	return checkV(this,'number',true)
		  }
		   }else{
		  	$("a201div").disabled = true;
		  	$("a202div").disabled = true;
		  	$("ruleendfun").readOnly = true;
		  	$("rulestartfun").readOnly = true;
		     form.rulestartfun.onblur = null;
		     form.ruleendfun.onblur = null;
		       $("rulestartfun").value="";
		       $("ruleendfun").value="";
		 }
          
		}
		function selOrg(){
			var c = openDialogFrame("/client/lowerorg_list.html",'选择机构',500,700)
			if(c!=null){
	          $("groupform").orgids.value=c;
	           $("orgdatalist").style.display="";
	           createTableOrg();
	           }
		}
		//初始化下拉框
		function findGiftCate(){	
			DWR.call("pointActivityService.findGiftCateGory",function(result){
				Common.initDict("xiaofeileixing",result,"请 选 择","0","1");
			});
		}
		function findTempletName2(){	
			var j=1;	
			DWR.call("pointActivityService.selOrg",org.orgLevel,j,function(result){
				Common.initDict("department2",result,"请 选 择","1","0");
			});
		}
		
		function deleteCal(v,r){
		         return	"<a href=# onclick=\"deleteC('"+r[6]+"');return false;\">删除</a>"
		}
		function deleteC(id){
		DWR.call("pointActivityService.deletePointRuleCalFun",id,function(result){
		createTableCal();
		});
		}
		function createTableOrg(){
			var columns =[];
			qtorg = new QueryTable("lower_location_query_selected","groupform","orgdatalist",columns);
			qtorg.showTable();
		}
		
		function createTableCal(){
			var columns =[];
			columns[6]={title:"删 除",width:"6%",align:"center",render:deleteCal,order:false}
			qtcal = new QueryTable("point_rule_cal_fun","groupformss","caldatalist",columns);
			qtcal.showTable();
		}
		//生成表格，创建QueryTable对象   
		function createTable(){
			var columns =[];
				columns[1]={render:function(v){return v.format();}}
				columns[2]={render:function(v){return v.format();}}
				columns[7]={title:"操作",width:"12%",align:"center",render:showsend,order:false}
				columns[8]={title:"操作",width:"6%",align:"center",render:tingyongFunc,order:false}
				columns[9]={title:"操作",width:"6%",align:"center",render:zhangtingFunc,order:false}
				columns[10]={title:"操作",width:"6%",align:"center",render:actstart,order:false}
				columns[11]={title:"操作",width:"6%",align:"center",render:xiugaiFunc,order:false}
			qt = new QueryTable("loy_rgcont","viewdate","datalist",columns);
		}
	function createTableRun(){
			var columns =[];
			      columns[1]={render:function(v){return v.format();}}
				columns[2]={render:function(v){return v.format();}}
				columns[10]={title:"操作",width:"6%",align:"center",render:xiugaiFuncrun,order:false}
			qtrun = new QueryTable("loy_rgcontrun","runfrom","rundatalist",columns);
			qtrun.showTable();
		}
			//修改活动中的规则表单
		function createTable2(){
			var columns=[];
               columns[7]={title:"查看",width:"10%",render:updatesend1};
			columns[8]={title:"操作",width:"10%",render:shanchuGFunc3};
			qt2 = new QueryTable("rule_list2","pcardformupdate","datalist2",columns);
			qt2.showTable();
		}
		//添加活动中的规则表单 
		function createTable3(){
			var columns=[];
			columns[7]={title:"查看",width:"10%",render:updatesend2};
			columns[8]={title:"操作",width:"10%",render:shanchuGFunc1};
			qt3 = new QueryTable("rule_list","detviewsave","datalist3",columns);
			qt3.showTable();
		}
	   function createTableSend(){
			var columns=[];
			columns[7]={title:"查看",width:"10%",render:updatesend3};
			columns[8]={title:"操作",width:"10%",render:deletesend};
			qtsend = new QueryTable("send_rule_list","sendform","senddatalist",columns);
			qtsend.showTable();
		}
		function createTablePointRulePro(){
				var columns =[];				
				qtPro = new QueryTable("loy_PointRulePro","showRuleForm","prodatalist",columns,"");
				qtPro.showTable();
			}
			function createTablePointRuleCalFun(){
				var columns =[];			
				qtFun = new QueryTable("loy_PointRuleCalFun","showRuleForm","fundatalist",columns,"");
				qtFun.showTable();
			}
			
		function updatesend1(v,r){
		  	return "<a href=# onclick=\"shownewrule('"+r[0]+"','"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[7]+"','1');return false;\">查看</a>"
		}
		function updatesend2(v,r){
		  	return "<a href=# onclick=\"shownewrule('"+r[0]+"','"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[7]+"','2');return false;\">查看</a>"
		}
		function updatesend3(v,r){
		  	return "<a href=# onclick=\"shownewrule('"+r[0]+"','"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[7]+"','3');return false;\">查看</a>"
		}

		function shownewrule(name,dec,funtype,start,end,num,id,aa){
		$("rulename2").innerHTML=name;
		$("rulecom2").innerHTML=dec;
		$("startTime2").innerHTML=start;
		$("endTime2").innerHTML=end;
		$("guizemoban2").innerHTML=num;
		$("caltype2").innerHTML=funtype;
		$("showRuleForm").ruleid.value=id;
	       dirs=aa;
		 switchPage('datelistview');

		 createTablePointRulePro();
		 createTablePointRuleCalFun();
		     
		}
		function deletesend(v,r){
		if(editable=="false"){
		  return	"<a href=# onclick=\><font color=\"gray\">删除</font></a>"
		}else{
		return "<a href=# onclick=\"deletnewrule('"+r[6]+"','"+r[7]+"');return false;\">删除</a>"
		}
		  	
		}
		function deletnewrule(type,id){
		if(showQuestion("您确认删除此规则?")==false){
				return;
			}
		DWR.call('pointActivityService.deleteNewRule',type,id,function(t){
			createTableSend();
			});
		}
		 var dirs;
		 function newruleback(){
		    if(backnew==1){
		    switchPage("detviewsave1");
		     createTable3();
		    }else{
		     switchPage("detviewaa");
		          createTable2();
				qt2.showTable();
		    }
		 }
		function backshowsend(){
		if(dirs=="3"){
		switchPage("detview3");
		
		}else if(dirs=="2"){
		   switchPage("detviewsave1");
		   createTable3();
		}else{
		switchPage("detviewaa");
		createTable2();
		qt2.showTable();
		}
		}
		//发送审核申请   
		function showsend(v,r){//处理数据 点公司名称进入编辑页面
		if(r[3]=="停用"){
		  return	"<a href=# onclick=\><font color=\"gray\">无需审核明细</font></a>"
		}else{
			return "<a href=# onclick=\"onEdit4('"+r[0]+"','"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[6]+"','"+r[7]+"','"+r[8]+"');return false;\">查看需审核明细</a>"
		}
		
		}
		//停用一个活动
		function tingyongFunc(v,r){//处理数据 点公司名称进入编辑页面
		 
			if(r[3]=="运行"&r[8]==true)
		    {
		      	return "<a href=# onclick=\"onEdit('"+r[7]+"');return false;\">停用</a>"
			 }else{
			  return	"<a href=# onclick=\><font color=\"gray\">停用</font></a>"
			 }
		
		}
		//暂停一个活动
		function zhangtingFunc(v,r){//处理数据 点公司名称进入编辑页面
			if(r[3]=="运行"&r[8]==true)
		    {
		    return "<a href=# onclick=\"onEdit3('"+r[7]+"');return false;\">暂停</a>"
			 }else{
			  return	"<a href=# onclick=\><font color=\"gray\">暂停</font></a>"
			 }
			
		}
		//修改一个活动  
		function xiugaiFunc(v,r){//处理数据 点公司名称进入编辑页面
			if(r[8]==false)
		    {
		      return "<a href=# onclick=\"onEdit2('"+r[0]+"','"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[6]+"','"+r[7]+"','"+r[8]+"');return false;\">查看</a>"
			 }else{
			 return "<a href=# onclick=\"onEdit2('"+r[0]+"','"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[6]+"','"+r[7]+"','"+r[8]+"');return false;\">修改</a>"
			 }
			
		}
		
		function actstart(v,r){//处理数据 点公司名称进入编辑页面
			if(r[3]=="暂停")
		    {
		    return "<a href=# onclick=\"actstartup('"+r[7]+"');return false;\">启动</a>"
			 }else{
			  return	"<a href=# onclick=\><font color=\"gray\">启动</font></a>"
			 }
			
		}
		function xiugaiFuncrun(v,r){
		return "<a href=# onclick=\"onEdit2('"+r[0]+"','"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[6]+"','"+r[7]+"','"+r[8]+"','"+r[9]+"');return false;\">查看</a>"
		}
	
		function onEdit4(name,startdate,enddate,stats,text,oper,orgu,id,edit){
	
	DWR.call('pointActivityService.getAMCheckType',id,function(e){
	 
		    if(e=="actstop"){
		 	showInformation("此活动已做停用申请");
		 	}else if(e=="actparse"){
		 	showInformation("此活动已做暂停申请");
		   }else if(e=="actstartup"){
		   showInformation("此活动已做启动申请");
		   }else{
	      var dates=new Date(startdate);
	      var datee=new Date(enddate);
		   $("sendactname").innerHTML=name;
		   $("sendactstats").innerHTML=stats;
		   $("sendacttext").innerHTML=text;
		   $("sendactoper").innerHTML=oper;
		   $("orgshow").innerHTML=orgu;
		   $("sendactstartdate").innerHTML=dates.format();
	     	$("sendactenddate").innerHTML=datee.format();
		$("sendform").ActId.value=id;
	   if(edit=="false"){
	    $("binSend").disabled=true;
	   }else{
	   $("binSend").disabled=false;
	   }
	      editable=edit;
		createTableSend(); 
		switchPage("detview3");
		   }
			});
		
		
		}
		//删除一条规则
		function shanchuGFunc(v,r){
			return "<a href=# onclick=\"onEdit6('"+r[6]+"','"+r[7]+"');return false;\">删除</a>"
		}
		function k(v,r){
			return "<a href=# onclick=\"shownew('"+r[10]+"');return false;\">查看</a>"
		}
		function shownew(){
		
		}
		function shanchuGFunc1(v,r){
			return "<a href=# onclick=\"onEdit9('"+r[7]+"');return false;\">删除</a>"
		}
		function onEdit9(id){
			if(showQuestion("您确认删除此规则?")==false){
				return;
			}
			DWR.call('pointActivityService.deleteNewRule',"addPointRule",id,function(t){
				createTable3();
				qt3.showTable();
			});
		}
		
		function actstartup(id){
			if(showQuestion("您确启动此活动？")==false){
		    	return;
		    }
			DWR.call('pointActivityService.actStopAndParse',"actstartup",id,function(v){
		     	if(v){
			    	showInformation("此活动已做启动申请");
			    }
			   createTable();
		       qt.showTable();
	  		 });
		}
		//停用确认	
		function onEdit(id){
			if(showQuestion("您确认停用?")==false){
		    	return;
		    }
			DWR.call('pointActivityService.actStopAndParse',"actstop",id,function(v){
		     	if(v){	  
				         showInformation("此活动已做停用申请");
			      }
			             createTable();
				         qt.showTable();
	  		 });
		}
		//显示活动详细信息
		function onEdit2(name,start,end,stats,text,opername,orgu,id,edit){
		        var starttime=new Date(start);
			    var endtime=new Date(end);
	    	if(stats=="初始化"){
	    	    $('detviewsave').newActId.value=id;
	    	     orderid=id;
	    		$("jfhdname1").value=name;
		 		$("qsshijian1").value=starttime.format();
		 		$("jsshijian1").value=endtime.format();
		 		$("jieshao1").value=text;
	    	   switchPage('detviewsave1');
	    		createTable3();
				qt3.showTable();
	    	
	    	}else{
	    	
		            $("actname").innerHTML=name;
		            $("actstats").innerHTML=stats;
		            $("acttext").innerHTML=text;
		            $("actoper").innerHTML=opername;
		            $("org").innerHTML=orgu;
		            $("pcardformupdate").actstartdate.value=starttime.format();
		            $("pcardformupdate").actenddate.value=endtime.format();
	                 ungrayform.pointActId.value=id;
	                 orderid=id;
		          if(edit=="false"){
		          $('btn1').disabled=true;

		          }else{
		            $('btn1').disabled=false;
		          }
		                 editable=edit;
                  $('pcardformupdate').pointActivityid.value=id;
                  if(stats=="初始化"){
                     $("pcardformupdate").bin1.disabled=false;
                     $("pcardformupdate").bin2.disabled=false;
                  }else{
                     $("pcardformupdate").bin1.disabled=true;
                     $("pcardformupdate").bin2.disabled=true;
                  }
				switchPage('detviewaa');
				createTable2();
				qt2.showTable();
	    	}
		       
		}
		//暂停确认
		function onEdit3(id){
			if(showQuestion("您确认暂停?")==false){
				return;
			}
			DWR.call('pointActivityService.actStopAndParse',"actparse",id,function(v){
		      if(v){
			    	showInformation("此活动已做暂停申请！");
			    		
			    }
			            createTable();
				        qt.showTable();
			   
		   });
		}
		
      
		//修改活动中修改规则
		function shanchuGFunc3(v,r){
		if(editable=="false"){
		return "<a href=# onclick=\><font color=\"gray\">不可编辑</font></a>"
		}else{
		if(r[6]=="初始态"){
		return "<a href=# onclick=\"deletnewrule2('"+r[7]+"');return false;\">删除</a>"
		}else if(r[6]=="正在运行"){
		return "<a href=# onclick=\"onEdit8('"+r[7]+"');return false;\">停用</a>"
		}else{
		 return "<a href=# onclick=\><font color=\"gray\">不可用</font></a>"
		  }
		 }	
		}
	function deletnewrule2(id){
		if(showQuestion("您确认删除此规则?")==false){
				return;
			}
		DWR.call('pointActivityService.deleteNewRule',"",id,function(t){
			createTable2();
			    qt2.showTable();
			});
		}
		//显示规则详细信息
		function onEdit8(id){
		
              DWR.call('pointActivityService.isStop',id,function(v){
			if(v){
			 showError("已经做停用申请了");
                  }else{      
	          DWR.call('pointActivityService.stopPointRule',id,function(t){
				
			});
	    	    	 }});	
		}
		//用于传递活动信息
		function addrule3(){	
			if(!checkForm("detview_save")) return;
			DWR.call('pointActivityService.createPointActivity',$("jfhdname").value,$("qsshijian").value,$("jsshijian").value,$("jieshao").value,function(t){
				switchPage('detviewsave1');
				$('detviewsave').newActId.value=t.id;
				ungrayform.pointActId.value=t.id;
				orderid=t.id;
				createTable3();
				qt3.showTable();
				$("jfhdname1").value=$("jfhdname").value;
		 		$("qsshijian1").value=$("qsshijian").value;
		 		$("jsshijian1").value=$("jsshijian").value;
		 		$("jieshao1").value=$("jieshao").value;
			});	
			//if(!Common.getText("org_level",$("fycdf").value)){
			//	$("fycdf1").value="";
	      	//}else{
	      	//		$("fycdf1").value=Common.getText("org_level",$("fycdf").value) 
		   //	}
		}
		//保存修改后活动
		function MDFP(){
		if(showQuestion("您确认发送审核?")==false){
				return;
		     	}
			DWR.call('pointActivityService.sendPointAM',$("sendform").ActId.value,function(t){
		       
			    showInformation("发送审核申请成功");
			    
				switchPage('group_all');
				$("listview").style.display="";
			     createTable();
				showData();
			});		
		}  
		function MDFP2(){
		     if(showQuestion("您确认发送审核?")==false){
				return;
		     	}
			DWR.call('pointActivityService.sendPointAM',$("detviewsave").newActId.value,function(t){
				showInformation("发送审核申请成功");
				switchPage('group_all');
				$("listview").style.display="";
			     createTable();
				showData();
			});		
		}  
		//取消跳转             
		function quxiao()
		{
			switchPage('group_all');
			$("listview").style.display="";
			     createTable();
				showData();
		}
		//页面跳转
		function save(){
			Common.setValues("detview_save",{});
		 	switchPage('detviewsave6');
		}
		 function format1(str){
	         if(str != "" && str != null){
		     var d = str.split("-");
		     return (new Date(d[0],(new Number(d[1]) -1),d[2])).format("yyyy/MM/dd");
	            }
	          return "";
          }
		//新建规则
	function saverule(){
		    var time1=$('ungrayform').startTime.value;
            var time2=$('ungrayform').endTime.value;
            var time33=$("actstarttime").value;
            var time34=$("actendtime").value;
            var time111=format1(time1);
            var time222=format1(time2);
            var time333=format1(time33);
            var time444=format1(time34);
            var date1=new Date(time111);
            var date2=new Date(time222);
            var date3=new Date(time333);
            var date4=new Date(time444);
         if(Date.parse(date3)<=Date.parse(date1)&&Date.parse(date4)>=Date.parse(date2))
		    {
		     if(!checkForm(ungrayform))return;
              if(ungrayform.guizemoban.value==2){
			     ungrayform.jifenlv.value=0;
			     DWR.call('pointActivityService.createPointRule',orderid,ungrayform.rulename.value,ungrayform.rulecom.value,ungrayform.startTime.value,ungrayform.endTime.value,ungrayform.guizemoban.value,ungrayform.caltype.value,ungrayform.jifenlv.value,function(t){
		         ruleid=t;
		         $("newruleid").value=t; 
		         switchPage('group_a');  
		         $("ruleatt").style.display="";
		         $("savegroupbt").disabled=false;
		         ungrayform.reset();	
		        });
			  }
			 else{
			     DWR.call('pointActivityService.createPointRule',orderid,ungrayform.rulename.value,ungrayform.rulecom.value,ungrayform.startTime.value,ungrayform.endTime.value,ungrayform.guizemoban.value,ungrayform.caltype.value,ungrayform.jifenlv.value,function(t){
		         ruleid=t;
		         if($("jfhdname1").value==null||$("jfhdname1").value==""){
		         switchPage('detviewaa');
		         createTable2() 
		         qt2.showTable();
		         ungrayform.reset();
		      }else{
		       switchPage('detviewsave1');
		       createTable3() 
		          ungrayform.reset();
		          }});
			    }

            }
         else
         {
           showInformation("规则日期必须在活动日期"+time33+"和"+time34+"之间");

          }
	
     }
     function resertProAndFun(){
                        groupform.reset();
		          groupformss.reset();
		       $("A01").checked=false;
		      $("A02").checked=false;
		      $("A03").checked=false;
		      $("a01div").style.display="none";
		      $("xiaofeileixing").value="";
		      $("a02div").style.display="none";
		      var   obj=document.getElementsByName("customers1");
		      for (var i=0;i<obj.length;i++) {
                  obj[i].checked=false;
                  }
	   	      
		    $("a03div").style.display="none";
		    
		     $("orgdatalist").style.display="none";
		     	
     }
		function backlist(){

		DWR.call('pointActivityService.isPointRuleCalFun',$("groupformss").newruleid.value,function(v){
		if(v){
			 if($("jfhdname1").value==null||$("jfhdname1").value==""){
		         switchPage('detviewaa');
		         createTable2() 
		         qt2.showTable();
		         
		          }else{
		          switchPage('detviewsave1');
		          createTable3() 
		          }
		       resertProAndFun();
		}else{
		 showError("请填积分率");
		}
	
		});
		   
		        
			
		}
		var backnew;
		//新建规则
		function selRuleTemNew(){
		          backnew=1;
		          $("actstarttime").value=$("qsshijian1").value;
		          $("actendtime").value= $("jsshijian1").value;
				switchPage('detview2');		
		}
		function selRuleTemUpdate(){
		          backunew=2;
		          $("actstarttime").value=$("actstartdate").value;
		          $("actendtime").value= $("actenddate").value;
				switchPage('detview2');		
		}
		//接收添加页面返回
		function backOperator1(v){
			if (!v) return;
			$("guizemoban1").value = v.name;
		}
		//显示、刷新表格
		function showData(){
		    createTable();
			qt.showTable();				//qt为全局的QueryTable对象  
		}
		//显示、刷新表格
		function showData2(){	
			qt2.showTable();				//qt2为全局的QueryTable对象  
		}
		//显示、刷新表格
		function showData3(){	
			qt3.showTable();				//qt3为全局的QueryTable对象  
		}
					
		function showTab(id, obj) {
           if(id == "ruleatt"){
          	 $("rulecal").style.display="none";
          	 $("ruleatt").style.display="";
          	 $("tab_role1").className = "treeTab";
            }else{
         		 $("rulecal").style.display="";
          	 $("ruleatt").style.display="none";
       }
    $("tab_base1").className = "treeTab";
    if (typeof obj == "string") obj = $(obj)
    obj.className = "treeTabc";
    return false;
}
function showTabAll(id, obj) {
            if(id == "listview"){
          	 $("runpaviwe").style.display="none";
          	 $("listview").style.display="";
          	  $("tab_role").className = "treeTab";
            }else{
         		 $("runpaviwe").style.display="";
         		 createTableRun();
          	 $("listview").style.display="none";
                          }
       $("tab_base").className = "treeTab";
       if (typeof obj == "string") obj = $(obj)
            obj.className = "treeTabc";
         return false;
        
}


function changetime(){
  $("pcardformupdate").actstartdate.disabled=false;
  $("pcardformupdate").actenddate.disabled=false;
}
function saveActTime(){
var start=$("pcardformupdate").actstartdate.value;
var end= $("pcardformupdate").actenddate.value;
var id= $("pcardformupdate").pointActivityid.value;
DWR.call('pointActivityService.updateActTime',start,end,id,function(t){
  $("pcardformupdate").actstartdate.disabled=true;
  $("pcardformupdate").actenddate.disabled=true;
		     });
}
   function lookcheck(){
           $("checkform").orgid.value=org.id;
            var columns =[];
           	columns[9]={title:"查看",width:"6%",align:"center",render:showoverlist,order:false}
            qt7 = new QueryTable("loy_check_detail_query2","checkform","datalist7",columns);
             
           switchPage('listview2');
        }
       function showoverlist(v,r){
      return "<a href=# onclick=\"showoverlists('"+r[0]+"','"+r[1]+"','"+r[2]+"','"+r[3]+"','"+r[4]+"','"+r[5]+"','"+r[6]+"','"+r[7]+"','"+r[8]+"','"+r[9]+"');return false;\">查看</a>"
       }
       function showoverlists(code,checktype,referer,sendTime,checkTime,atOrg,checker,varValue,comment,id){
               $("code7").innerHTML=code;
		     $("checktype7").innerHTML=checktype;
		     $("referer7").innerHTML=referer;	
		     $("sendTime7").innerHTML=sendTime;	
		      $("checkTime7").innerHTML=checkTime;	
			   $("atOrg7").innerHTML=atOrg;
		     $("checker7").innerHTML=checker;
		     $("varValue7").innerHTML=varValue;	
		    if(comment=="null") {$("comment7").innerHTML="";
                         }
                    else $("comment7").innerHTML=comment;	
		      crelistform1.act.value=id;
		       createTableList();
		       showDataList();
        switchPage('listview9');
       }
       function createTableList(){
			var columns = [];
			qtlist = new QueryTable("loy_point_crelist","crelistform1","dlist",columns);				
		}		
     function showDataList(){
			qtlist.showTable();
		}
         function showData5(){
         
          qt7.showTable();
       }
       function Cancl2(){
			showData5();
		    switchPage("listview2");
		
		}
	</script>
</head>
<body onload="load()" onunload="deleteRuleByFun()">
<!--页面导航-->
<div class=" nav ">
<div id="nav">&nbsp;</div>
</div>

<div id="detviewaa" style="display: none;" align="center">
<form id="pcardformupdate" name="pcardformupdate"><input
	type="hidden" id="command" name="command"> <input type="hidden"
	name="pointActivityid" id="pointActivityid">
<div class="form">
<div class="formTitle">积分活动修改</div>
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label6">
	<tr>
		<td><label>积分活动名称</label>&nbsp;&nbsp;<span id="actname"></span></td>
	     <td><label>积分活动介绍</label>&nbsp;&nbsp;<span id="acttext"></span></td>
		<td><label>状 态</label><span id="actstats"></span></td>
	</tr>
	<tr>
		<td><label>创建者</label> <span id="actoper"></span></td>
		<td><label>创建机构</label> &nbsp;&nbsp;<span id="org"></span></td>
	</tr>
	<tr>
		<td><label>活动开始日期</label> <input type="text" disabled
			name="actstartdate" onblur="checkV(this,'_futureDate',true)"><a
			href="javascript:void(0)"
			onclick="showDatePicker($('actstartdate'));" class="date"
			title="选择日期">&nbsp;&nbsp;</a></td>
		<td><label>活动结束日期</label> <input type="text" disabled
			name="actenddate" onblur="checkV(this,'_futureDate',true)"><a
			href="javascript:void(0)" onclick="showDatePicker($('actenddate'));"
			class="date" title="选择日期">&nbsp;&nbsp;</a>
		<button type="button" id="bin1" disabled onclick="changetime()">更改时间</button>
		<button type="button" id="bin2" disabled onclick="saveActTime()">保存</button>
		</td>
	</tr>

</table>
</div>
<div class="listBar">
<table align=right>
	<tr>
		<td>
		<div class="listBtn" id="listBtn1">
		<button type="button" id="btn1" disabled onclick="selRuleTemUpdate()">新建规则</button>
		</div>
		</td>
		<td>
		<div class="listBtn" id="listBtn3">
		<button type="button" onclick="backOrder()">返回</button>
		</div>
		</td>
	</tr>
</table>
</div>
<div id=datalist2></div>
</div>

</form>
</div>

<div id="detview3" style="display: none;" align="center">
<form id="sendform" name="sendform"><input
	type="hidden" id="ActId" name="ActId">
<div class="form">
<div class="formTitle">审核明细</div>
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label6">
	<tr>
		<td><label>积分活动名称</label>&nbsp;&nbsp;<span id="sendactname"></span></td>
		<td><label>积分活动介绍</label>&nbsp; <span id="sendacttext"></span></td>
		<td><label>状态</label>&nbsp;&nbsp;<span id="sendactstats"></span></td>
	</tr>
	<tr>
		
		<td><label>创建者</label> &nbsp;&nbsp;<span id="sendactoper"></span></td>
		<td><label>创建机构</label> &nbsp;&nbsp;<span id="orgshow"></span></td>
	</tr>
	<tr>
		<td><label>活动开始日期</label>&nbsp;<span id="sendactstartdate"></span></td>
		<td><label>活动结束日期</label>&nbsp;<span id="sendactenddate"></span>
		</td>
	</tr>

</table>
</div>
<div id=senddatalist></div>
<p>
<button type="button" id="binSend" onclick="MDFP()">发送审核申请</button>
<button type="reset" onclick="quxiao()">返回</button>
</p>
</div>

</form>
</div>

<div id="detview2" style="display: none;" align="center">
<form id="ungrayform" name="ungrayform" method='POST'>
    <input type="hidden" id="pointActId" name="pointActId"/>
	<input type="hidden" id="actstarttime" name="actstarttime"/>
	<input type="hidden" id="actendtime" name="actendtime"/>
<div class="form">
<div class="formTitle">积分规则创建</div>
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label4">
	<tr>
		<td><label>规则名称</label> <input type="text" name="rulename"
			onblur="checkV(this,'',true)"maxlength="20"></a><span class="des">*</span></td>
		<td><label>规则描述</label> <input type="text" name="rulecom"
			value="" onblur="checkV(this,'',true)" maxlength="80"></a><span class="des">*</span></td>
	</tr>
	<tr>
		<td><label>开始日期</label> <input readonly type="text"
			name="startTime" onblur="checkV(this,'_futureDate',true)"><a href="javascript:void(0)"
			onclick="showDatePicker($('startTime'));" class="date" title="选择日期">&nbsp;&nbsp;</a><span
			class="des">*</span></td>
		<td><label>结束日期</label> <input readonly type="text"
			name="endTime" onblur="checkV(this,'_futureDate',true)"><a href="javascript:void(0)"
			onclick="showDatePicker($('endTime'));" class="date" title="选择日期">&nbsp;&nbsp;</a><span
			class="des">*</span></td>
	</tr>
	<tr>
		<td><label>规则模板</label> <select name="guizemoban" readonly
			onblur="checkV(this,'',true)" onchange="changemoban()">
			<option></option>
		</select></a><span class="des">*</span></td>
		<td><label>计算类型</label> <select name="caltype" readonly
			onblur="checkV(this,'',true)">
			<option></option>
		</select></a><span class="des">*</span></td>
	</tr>
	<tr>
		<td id=pointrate><label>积分率</label> <input type='text'
			id='jifenlv' name='jifenlv' onblur="checkV(this,'double',true)"></a><span
			class='des'>*</span></td>
	</tr>
	
</table>
</div>
<p>
<button type="button" onclick="saverule()">保 存</button>
<button type="reset" onclick="newruleback()">返 回</button>
</p>
</form>
<div class="nav">
<div id="nav">&nbsp;</div>
</div>

</div>

<div id="detviewsave1" style="display: none">
<form id="detviewsave" name="detviewsave">
<div class="form"><input type="hidden" id="newActId"
	name="newActId">
<div class="formTitle">积分活动</div>
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label6">
	<tr>
		<td><label>积分活动名称</label>&nbsp;&nbsp;&nbsp;&nbsp;<input
			type="text" name="jfhdname1" readonly class="readonly"
			onblur="checkV(this,'',true)"></td>
		<td><label>活动开始日期</label>&nbsp;&nbsp;&nbsp;&nbsp;<input
			type="text" name="qsshijian1" readonly class="readonly"
			onblur="checkV(this,'_futureDate',true)"></td>
	</tr>
	<tr>
		<td><label>活动结束日期</label>&nbsp;&nbsp;&nbsp;&nbsp;<input
			type="text" name="jsshijian1" readonly class="readonly"
			onblur="checkV(this,'_futureDate',true)"></td>
		<td><label>积分活动介绍</label>&nbsp;&nbsp;&nbsp;&nbsp;<input
			type="text" name="jieshao1" readonly class="readonly"
			onblur="checkV(this,'',true)"  maxlength="80"></td>
	</tr>
</table>
</div>
<div class="listBorder" id="rule_list2">

<div class="listBtn" id="listBtn">
<button type="button" onclick="selRuleTemNew()">新建规则</button>
</div>
<!--查询结构列表-->
<div id="datalist3"></div>
</div>
<p>
<p>
<button type="button" onclick="MDFP2()">发送审核申请</button>
<button type="reset" onclick="quxiao()">返回</button>
</p>
</p>
</form>
</div>
<div id="detviewsave6" style="display: none;">
<form id="detview_save" name="detview_save">
<div class="form">
<div class="formTitle">积分活动增加</div>
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label6">
	<tr>
		<td><label>积分活动名称 </label> <input type="text" name="jfhdname"
			onblur="checkV(this,'',true)" maxlength="20"><span class="des">*</span></td>
		<td><label>积分活动介绍 </label> <input type="text" name="jieshao"
			onblur="checkV(this,'',true)" maxlength="80"><span class="des">*</span></td>
	</tr>
	<tr>
		<td><label>活动开始日期 </label> <input type="text" name="qsshijian"
			readonly class="readonly" onblur="checkV(this,'_futureDate',true)"><a
			href="javascript:void(0)" onclick="showDatePicker($('qsshijian'));"
			class="date" title="选择日期">&nbsp;&nbsp;</a><span class="des">*</span></td>
		<td><label>活动结束日期 </label> <input type="text" name="jsshijian"
			readonly class="readonly" onblur="checkV(this,'_futureDate',true)"><a
			href="javascript:void(0)" onclick="showDatePicker($('jsshijian'));"
			class="date" title="选择日期">&nbsp;&nbsp;</a><span class="des">*</span></td>
	</tr>
</table>
</div>
<p>
<button type="button" onclick="addrule3()">确 认</button>
<button type="reset" onclick="quxiao()">取 消</button>
</p>
</form>
</div>
<div id='group_a' align="left" style="display: none">
<div class="formTitle">填写规则属性与规则的计算方式</div>
<a href='#' onclick="showTab('ruleatt',this);" onfocus="this.blur()"
	tabindex="-1" id="tab_base1" class="treeTabc">规则属性</a> <a href='#'
	onclick="showTab('rulecal',this);" onfocus="this.blur()" tabindex="-1"
	id="tab_role1" class="treeTab">规则的计算方式</a>
<button type="button" name="overs" onclick="backlist()">增加完毕</button>
</div>
<div id='ruleatt' style='display: none;'>
<form id="groupform" name="groupform"><input type="hidden"
	name="id"> <input type="hidden" name="orgids">

<div class="form">
<div class="formTitle">规则属性</div>
<table cellSpacing=0 cellPadding=4 width="100%" border=0>
	<tr>
		<td><input type="checkbox" name="actions" value="A01" id="A01"
			onClick="a01change()">业务对象</input></td>
		<td>
		<div id="a01div" style='display: none;'><label>消费类型</label> <select
			name='xiaofeileixing' id='xiaofeileixing'
			onchange='changes3(this.value)'>
			<option></option>
		</select></div>
		</td>
	</tr>
	<tr>
		<td><input type="checkbox" name="customers" value="A02" id="A02"
			onClick="a01change()">客户对象</input></td>
		<td>
		<div id="a02div" style='display: none;'><input type="checkbox"
			name="customers1" value="1" id="customers1">普通客户</input><input
			type="checkbox" name="customers1" value="2" id="customers1">银卡客户</input><input
		type="checkbox" name="customers1" value="3" id="customers1">金卡客户</input><input
			type="checkbox" name="customers1" value="4" id="customers1">钻石卡客户</input></div>
		</td>
	<tr>
		<td valign="top"><input type="checkbox" name="location"
			value="A03" id="A03" onClick="a01change()">执行地域</input></td>
		<td valign="center">
		<div id="a03div" style='display: none;'><label>请选择执行地域</label><a
			class=orga href=# onclick="selOrg()" id="aaaaa">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>&nbsp;&nbsp;&nbsp;&nbsp;<font
			color="red">&nbsp;*</font></div>
		<div id=orgdatalist>
		</td>
	</tr>
</table>

</div>
<p>
<button type="button" name="savegroupbt" id="savegroupbt"
	onclick="saveRulePro()">增加</button>
<button type="button" name="canceleditbt" onclick="replayRulePro()"
	disabled>重置</button>
</p>
</form>
</div>

<div id='rulecal' style='display: none;'>

<form id="groupformss" name="groupformss"><input type="hidden"
	name="id"> <input type="hidden" name="newruleid"> <input
	type="hidden" name="orgLevels">

<div class="formTitle">规则的计算方式</div>
<table cellSpacing=0 cellPadding=4 width="100%" border=0>
	<tr>
		<td><input type="checkbox" name="actions" value="A201" id="A201"
			onClick="a201change()">时间分段</input></td>
		<td id="a101div" disabled><label>时间起点值</label>&nbsp;&nbsp; <select
			name='rulestarttime' id='rulestratime' readonly>
			<option></option>
		</select></td>
		<td id="a102div" disabled><label>时间终点值</label>&nbsp;&nbsp;&nbsp;<select
			name='ruleendtime' id='ruleendtime'readonly >
			<option></option>
		</select></td>
	</tr>
	<tr>
		<td><input type="checkbox" name="actions" value="A202" id="A202"
			onClick="a201change()">交易额分段</input></td>
		<td id="a201div" disabled>
		<div><label>交易额起点值</label> <input readonly type="text"
			name="rulestartfun"></div>
		</td>
		<td id="a202div"><label>交易额终点值</label> <input readonly type="text"
			name="ruleendfun" id="ruleendfun">
		</td>
	</tr>
	<tr>
		<td><label>积分率</label> <input type='text' id='rate' name='rate'
			onblur=checkV(this,'number',true)></a><span class='des'>*</span></td>
		<td>
		<p>
		<button type="button" name="savegroupbt" onclick="saveCal()">增加</button>
		</p>
		</td>
	</tr>


</table>
<div id=caldatalist></div>
</form>

</div>

<div id="datelistview" style='display: none;'>
<div class="form">
<form id="showRuleForm" name="showRuleForm"><input
	type="hidden" name="ruleid" id="ruleid"> <input type="hidden"
	name="aa" id="aa">
<table cellSpacing=0 cellPadding=4 width="100%" border=0>
	<tr>
		<td><label>规则名称</label>&nbsp;<span id="rulename2"></span></td>
		<td><label>规则描述</label>&nbsp;<span id="rulecom2"></span></td>
	</tr>
	<tr>
		<td><label>开始日期</label>&nbsp; <span id="startTime2"></span></td>
		<td><label>结束日期</label> &nbsp;<span id="endTime2"></span></td>
	</tr>
	<tr>
		<td><label>规则模板</label>&nbsp;<span id="guizemoban2"></span></td>
		<td><label>计算类型</label>&nbsp;<span id="caltype2"></span></td>
		<td>
		<p>
		<button type="button" name="savegroupbt3" onclick="backshowsend()">返回</button>
		</p>
		</td>
	</tr>
</table>
</form>
</div>
<table cellSpacing=0 cellPadding=4 width="100%" border=0>
	<tr>
		<td width="50%">
		<div id="prodatalist"></div>
		</td>
		<td width="50%">
		<div id="fundatalist"></div>
		</td>
	</tr>
</table>
</div>


 <div id=listview2 style='display: none;' align=center>
	      <div class="formTitle">审核记录</div>
			<div class="form">
		<form id='checkform' name='checkform' >
		     	<input type=hidden id=orgid name=orgid>
			<table cellSpacing=0 cellPadding=4 width="100%" border=0 class="col3 label6">
			<tr>
			<td><label>申请时间</label> <input type="text"
						name="sendDate" id="sendDate" onblur="checkV(this,'date')"><img align=absMiddle onmouseup='showDatePicker( sendDate );' src="../images/icon/date.gif" alt="选择日期" style="CURSOR: hand" border="0"></input></td>
			<td><label>提交人</label> <input type=text name="referer"  id="referer" ></td>
			<td><label>变更单编号</label> <input type=text name="code"  id="code" ></td>
			
			<td>
			<button type="button" onclick="showData5()">查 询</button>
			<button type="button" onclick="quxiao()">返 回</button>
			</td>
			</tr>
			<tr>
			<td><label>审核时间</label> <input type="text"
						name="checkDate" id="checkDate" onblur="checkV(this,'date')"><img align=absMiddle onmouseup='showDatePicker( checkDate );' src="../images/icon/date.gif" alt="选择日期" style="CURSOR: hand" border="0" /></td>
			<td><label>审核人</label> <input type=text name="checker"  id="checker" ></td>
			<td></td>
			
			</tr>
			</table>
		</form>
	</div>
	<div id=datalist7>
			</div>
			</div>


<div id=listview9 style='display: none;' align=center>
<form id='crelistform1' name='crelistform1' method='POST'
	enctype='multipart/form-data' action='/upload/pic/'>
<div class=form>
<div class="formTitle">规则信息</div>
<table cellSpacing=0 cellPadding=4 width="100%" border=0
	class="col3 label6">
	<input type="hidden" name="act"
	id="act">
<td>
<table cellSpacing=0 cellPadding=4 width="100%" border=0
	class="col3 label6">
	
	<tr>
	    <td><label>变更单编号</label> <span id="code7"></span></td>
		<td><label>申请日期</label> <span id="sendTime7"></span></td>

	</tr>
	<tr>
	    <td><label>审核类型</label> <span id="checktype7"></span></td>
		<td><label>审核日期</label> <span id="checkTime7"></span></td>
		
	</tr>
	<tr>
		<td><label>审核机构</label> <span id="atOrg7"></span></td>
		<td><label>审核结果</label> <span id="varValue7"></span></td>
		
	<tr>
	<td><label>提交人</label> <span id="referer7"></span></td>
	<td><label>审核人</label> <span id="checker7"></span></td>
	</tr>
</table>
</td>
<td>
<table cellSpacing=0 cellPadding=4 width="100%" border=0
	class="col3 label6">
	<td><label>反馈意见</label> <textarea  readonly  name="comment7" cols="30"
			rows="4"></textarea><font></font></td>	
	</tr>
</table>
</td>
</table>
</div>
<div id="dlist"></div>
</form>


<button type="button" onclick="Cancl2()">返回</button>
</div>
</div>
<div id='group_all' align="left">
<div class="formTitle">积分活动管理</div>
<a href='#' onclick="showTabAll('listview',this);" onfocus="this.blur()" tabindex="-1" id="tab_base" class="treeTabc">本地积分活动</a>
 <a href='#' onclick="showTabAll('runpaviwe',this);" onfocus="this.blur()" tabindex="-1" id="tab_role" class="treeTab">正运行的积分活动</a>

</div>

<div id="runpaviwe"  style='display: none;'>
<form name="runfrom" id="runfrom"><input
	type="hidden" id="orgid" name="orgid"/></form>
	
<div id=rundatalist></div>
</div>
<div id="listview"  style="display: none">
<div class="form">
<form name="viewdate" id="viewdate"><input
	type="hidden" id="orgid" name="orgid">
<div class="searchForm">
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label6">
	<tr>
		<td><label>积分活动名称</label> <input type="text" name="comAccountNo"
			id="comAccountNo" value=""></td>
		<td><label>状态</label> <select name="unitNo" id="unitNo">
			<option></option>
		</select></td>
		  <td></td>
		<td>
		<button type="button" onclick="showData()">查 询</button><button type="button" onclick="save()">增 加</button>
		<button type="button" onclick="lookcheck()">查询审核记录</button>
		</td>
	</tr>
	
</table>
</div>
</form>
</div>
<div id=datalist></div>
</div>
</body>
</html>